home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / usr_-_Usr_Files / BIN / PERLDOC < prev    next >
Text File  |  1999-09-17  |  17KB  |  645 lines

  1. #!/usr/bin/perl
  2.     eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
  3.     if 0;
  4.  
  5. use strict;
  6. my @pagers = ();
  7. push @pagers, "/usr/bin/less" if -x "/usr/bin/less";
  8.  
  9. #
  10. # Perldoc revision #1 -- look up a piece of documentation in .pod format that
  11. # is embedded in the perl installation tree.
  12. #
  13. # This is not to be confused with Tom Christianson's perlman, which is a
  14. # man replacement, written in perl. This perldoc is strictly for reading
  15. # the perl manuals, though it too is written in perl.
  16.  
  17. if(@ARGV<1) {
  18.     my $me = $0;        # Editing $0 is unportable
  19.     $me =~ s,.*/,,;
  20.     die <<EOF;
  21. Usage: $me [-h] [-r] [-i] [-v] [-t] [-u] [-m] [-l] [-F] [-X] PageName|ModuleName|ProgramName
  22.        $me -f PerlFunc
  23.        $me -q FAQKeywords
  24.  
  25. The -h option prints more help.  Also try "perldoc perldoc" to get
  26. aquainted with the system.
  27. EOF
  28. }
  29.  
  30. use Getopt::Std;
  31. use Config '%Config';
  32.  
  33. my @global_found = ();
  34. my $global_target = "";
  35.  
  36. my $Is_VMS = $^O eq 'VMS';
  37. my $Is_MSWin32 = $^O eq 'MSWin32';
  38. my $Is_Dos = $^O eq 'dos';
  39.  
  40. sub usage{
  41.     warn "@_\n" if @_;
  42.     # Erase evidence of previous errors (if any), so exit status is simple.
  43.     $! = 0;
  44.     die <<EOF;
  45. perldoc [options] PageName|ModuleName|ProgramName...
  46. perldoc [options] -f BuiltinFunction
  47. perldoc [options] -q FAQRegex
  48.  
  49. Options:
  50.     -h   Display this help message
  51.     -r   Recursive search (slow)
  52.     -i   Ignore case 
  53.     -t   Display pod using pod2text instead of pod2man and nroff
  54.              (-t is the default on win32)
  55.     -u     Display unformatted pod text
  56.     -m   Display module's file in its entirety
  57.     -l   Display the module's file name
  58.     -F   Arguments are file names, not modules
  59.     -v     Verbosely describe what's going on
  60.     -X     use index if present (looks for pod.idx at $Config{archlib})
  61.     -q   Search the text of questions (not answers) in perlfaq[1-9]
  62.  
  63. PageName|ModuleName...
  64.          is the name of a piece of documentation that you want to look at. You 
  65.          may either give a descriptive name of the page (as in the case of
  66.          `perlfunc') the name of a module, either like `Term::Info', 
  67.          `Term/Info', the partial name of a module, like `info', or 
  68.          `makemaker', or the name of a program, like `perldoc'.
  69.  
  70. BuiltinFunction
  71.          is the name of a perl function.  Will extract documentation from
  72.          `perlfunc'.
  73.  
  74. FAQRegex
  75.          is a regex. Will search perlfaq[1-9] for and extract any
  76.          questions that match.
  77.  
  78. Any switches in the PERLDOC environment variable will be used before the 
  79. command line arguments.  The optional pod index file contains a list of
  80. filenames, one per line.
  81.  
  82. EOF
  83. }
  84.  
  85. if( defined $ENV{"PERLDOC"} ) {
  86.     require Text::ParseWords;
  87.     unshift(@ARGV, Text::ParseWords::shellwords($ENV{"PERLDOC"}));
  88. }
  89.  
  90. use vars qw( $opt_m $opt_h $opt_t $opt_l $opt_u $opt_v $opt_r $opt_i $opt_F $opt_f $opt_X $opt_q );
  91.  
  92. getopts("mhtluvriFf:Xq:") || usage;
  93.  
  94. usage if $opt_h;
  95.  
  96. my $podidx;
  97. if( $opt_X ) {
  98.     $podidx = "$Config{'archlib'}/pod.idx";
  99.     $podidx = "" unless -f $podidx && -r _ && -M _ <= 7;
  100. }
  101.  
  102. if( (my $opts = do{ local $^W; $opt_t + $opt_u + $opt_m + $opt_l }) > 1) {
  103.     usage("only one of -t, -u, -m or -l")
  104. } elsif ($Is_MSWin32 || $Is_Dos) {
  105.     $opt_t = 1 unless $opts
  106. }
  107.  
  108. if ($opt_t) { require Pod::Text; import Pod::Text; }
  109.  
  110. my @pages;
  111. if ($opt_f) {
  112.    @pages = ("perlfunc");
  113. } elsif ($opt_q) {
  114.    @pages = ("perlfaq1" .. "perlfaq9");
  115. } else {
  116.    @pages = @ARGV;
  117. }
  118.  
  119. # Does this look like a module or extension directory?
  120. if (-f "Makefile.PL") {
  121.     # Add ., lib and blib/* libs to @INC (if they exist)
  122.     unshift(@INC, '.');
  123.     unshift(@INC, 'lib') if -d 'lib';
  124.     require ExtUtils::testlib;
  125. }
  126.  
  127.  
  128.  
  129. sub containspod {
  130.     my($file, $readit) = @_;
  131.     return 1 if !$readit && $file =~ /\.pod$/i;
  132.     local($_);
  133.     open(TEST,"<$file");
  134.     while(<TEST>) {
  135.     if(/^=head/) {
  136.         close(TEST);
  137.         return 1;
  138.     }
  139.     }
  140.     close(TEST);
  141.     return 0;
  142. }
  143.  
  144. sub minus_f_nocase {
  145.      my($dir,$file) = @_;
  146.      my $path = join('/',$dir,$file);
  147.      return $path if -f $path and -r _;
  148.      if (!$opt_i or $Is_VMS or $Is_MSWin32 or $Is_Dos or $^O eq 'os2') {
  149.         # on a case-forgiving file system or if case is important 
  150.     # that is it all we can do
  151.     warn "Ignored $path: unreadable\n" if -f _;
  152.     return '';
  153.      }
  154.      local *DIR;
  155.      local($")="/";
  156.      my @p = ($dir);
  157.      my($p,$cip);
  158.      foreach $p (split(/\//, $file)){
  159.     my $try = "@p/$p";
  160.     stat $try;
  161.      if (-d _){
  162.          push @p, $p;
  163.         if ( $p eq $global_target) {
  164.         my $tmp_path = join ('/', @p);
  165.         my $path_f = 0;
  166.         for (@global_found) {
  167.             $path_f = 1 if $_ eq $tmp_path;
  168.         }
  169.         push (@global_found, $tmp_path) unless $path_f;
  170.         print STDERR "Found as @p but directory\n" if $opt_v;
  171.         }
  172.      } elsif (-f _ && -r _) {
  173.          return $try;
  174.      } elsif (-f _) {
  175.         warn "Ignored $try: unreadable\n";
  176.      } else {
  177.          my $found=0;
  178.          my $lcp = lc $p;
  179.          opendir DIR, "@p";
  180.          while ($cip=readdir(DIR)) {
  181.          if (lc $cip eq $lcp){
  182.              $found++;
  183.              last;
  184.          }
  185.          }
  186.          closedir DIR;
  187.          return "" unless $found;
  188.          push @p, $cip;
  189.          return "@p" if -f "@p" and -r _;
  190.         warn "Ignored @p: unreadable\n" if -f _;
  191.      }
  192.      }
  193.      return "";
  194. }
  195.  
  196.  
  197. sub check_file {
  198.     my($dir,$file) = @_;
  199.     if ($opt_m) {
  200.     return minus_f_nocase($dir,$file);
  201.     } else {
  202.     my $path = minus_f_nocase($dir,$file);
  203.         return $path if length $path and containspod($path);
  204.     }
  205.     return "";
  206. }
  207.  
  208.  
  209. sub searchfor {
  210.     my($recurse,$s,@dirs) = @_;
  211.     $s =~ s!::!/!g;
  212.     $s = VMS::Filespec::unixify($s) if $Is_VMS;
  213.     return $s if -f $s && containspod($s);
  214.     printf STDERR "Looking for $s in @dirs\n" if $opt_v;
  215.     my $ret;
  216.     my $i;
  217.     my $dir;
  218.     $global_target = (split('/', $s))[-1];
  219.     for ($i=0; $i<@dirs; $i++) {
  220.     $dir = $dirs[$i];
  221.     ($dir = VMS::Filespec::unixpath($dir)) =~ s!/$!! if $Is_VMS;
  222.     if (       ( $ret = check_file $dir,"$s.pod")
  223.         or ( $ret = check_file $dir,"$s.pm")
  224.         or ( $ret = check_file $dir,$s)
  225.         or ( $Is_VMS and
  226.              $ret = check_file $dir,"$s.com")
  227.         or ( $^O eq 'os2' and 
  228.              $ret = check_file $dir,"$s.cmd")
  229.         or ( ($Is_MSWin32 or $Is_Dos or $^O eq 'os2') and
  230.              $ret = check_file $dir,"$s.bat")
  231.         or ( $ret = check_file "$dir/pod","$s.pod")
  232.         or ( $ret = check_file "$dir/pod",$s)
  233.     ) {
  234.         return $ret;
  235.     }
  236.     
  237.     if ($recurse) {
  238.         opendir(D,$dir);
  239.         my @newdirs = map "$dir/$_", grep {
  240.         not /^\.\.?$/ and
  241.         not /^auto$/  and   # save time! don't search auto dirs
  242.         -d  "$dir/$_"
  243.         } readdir D;
  244.         closedir(D);
  245.         next unless @newdirs;
  246.         @newdirs = map((s/.dir$//,$_)[1],@newdirs) if $Is_VMS;
  247.         print STDERR "Also looking in @newdirs\n" if $opt_v;
  248.         push(@dirs,@newdirs);
  249.     }
  250.     }
  251.     return ();
  252. }
  253.  
  254. my @found;
  255. foreach (@pages) {
  256.         if ($podidx && open(PODIDX, $podidx)) {
  257.         my $searchfor = $_;
  258.         local($_);
  259.         $searchfor =~ s,::,/,g;
  260.         print STDERR "Searching for '$searchfor' in $podidx\n" if $opt_v;
  261.         while (<PODIDX>) {
  262.         chomp;
  263.         push(@found, $_) if m,/$searchfor(?:\.(?:pod|pm))?$,i;
  264.         }
  265.         close(PODIDX);
  266.         next;
  267.         }
  268.     print STDERR "Searching for $_\n" if $opt_v;
  269.     # We must look both in @INC for library modules and in PATH
  270.     # for executables, like h2xs or perldoc itself.
  271.     my @searchdirs = @INC;
  272.     if ($opt_F) {
  273.       next unless -r;
  274.       push @found, $_ if $opt_m or containspod($_);
  275.       next;
  276.     }
  277.     unless ($opt_m) { 
  278.         if ($Is_VMS) {
  279.         my($i,$trn);
  280.         for ($i = 0; $trn = $ENV{'DCL$PATH'.$i}; $i++) {
  281.             push(@searchdirs,$trn);
  282.         }
  283.         push(@searchdirs,'perl_root:[lib.pod]')  # installed pods
  284.         } else {
  285.             push(@searchdirs, grep(-d, split($Config{path_sep}, 
  286.                          $ENV{'PATH'})));
  287.         }
  288.     }
  289.     my @files = searchfor(0,$_,@searchdirs);
  290.     if( @files ) {
  291.         print STDERR "Found as @files\n" if $opt_v;
  292.     } else {
  293.         # no match, try recursive search
  294.         
  295.         @searchdirs = grep(!/^\.$/,@INC);
  296.         
  297.         @files= searchfor(1,$_,@searchdirs) if $opt_r;
  298.         if( @files ) {
  299.             print STDERR "Loosely found as @files\n" if $opt_v;
  300.         } else {
  301.             print STDERR "No documentation found for \"$_\".\n";
  302.             if (@global_found) {
  303.                 print STDERR "However, try\n";
  304.                 for my $dir (@global_found) {
  305.                 opendir(DIR, $dir) or die "$!";
  306.                 while (my $file = readdir(DIR)) {
  307.                     next if ($file =~ /^\./);
  308.                     $file =~ s/\.(pm|pod)$//;
  309.                     print STDERR "\tperldoc $_\::$file\n";
  310.                 }
  311.                 closedir DIR;
  312.                 }
  313.             }
  314.         }
  315.     }
  316.     push(@found,@files);
  317. }
  318.  
  319. if(!@found) {
  320.     exit ($Is_VMS ? 98962 : 1);
  321. }
  322.  
  323. if ($opt_l) {
  324.     print join("\n", @found), "\n";
  325.     exit;
  326. }
  327.  
  328. my $lines = $ENV{LINES} || 24;
  329.  
  330. my $no_tty;
  331. if( ! -t STDOUT ) { $no_tty = 1 }
  332.  
  333. my $tmp;
  334. if ($Is_MSWin32) {
  335.     $tmp = "$ENV{TEMP}\\perldoc1.$$";
  336.     push @pagers, qw( more< less notepad );
  337.     unshift @pagers, $ENV{PAGER}  if $ENV{PAGER};
  338. } elsif ($Is_VMS) {
  339.     $tmp = 'Sys$Scratch:perldoc.tmp1_'.$$;
  340.     push @pagers, qw( most more less type/page );
  341. } elsif ($Is_Dos) {
  342.     $tmp = "$ENV{TEMP}/perldoc1.$$";
  343.     $tmp =~ tr!\\/!//!s;
  344.     push @pagers, qw( less.exe more.com< );
  345.     unshift @pagers, $ENV{PAGER}  if $ENV{PAGER};
  346. } else {
  347.     if ($^O eq 'os2') {
  348.       require POSIX;
  349.       $tmp = POSIX::tmpnam();
  350.       unshift @pagers, 'less', 'cmd /c more <';
  351.     } else {
  352.       $tmp = "/tmp/perldoc1.$$";      
  353.     }
  354.     push @pagers, qw( more less pg view cat );
  355.     unshift @pagers, $ENV{PAGER}  if $ENV{PAGER};
  356. }
  357. unshift @pagers, $ENV{PERLDOC_PAGER} if $ENV{PERLDOC_PAGER};
  358.  
  359. if ($opt_m) {
  360.     foreach my $pager (@pagers) {
  361.         system("$pager @found") or exit;
  362.     }
  363.     if ($Is_VMS) { eval 'use vmsish qw(status exit); exit $?' }
  364.     exit 1;
  365.  
  366. if ($opt_f) {
  367.    my $perlfunc = shift @found;
  368.    open(PFUNC, $perlfunc) or die "Can't open $perlfunc: $!";
  369.  
  370.    # Functions like -r, -e, etc. are listed under `-X'.
  371.    my $search_string = ($opt_f =~ /^-[rwxoRWXOeszfdlpSbctugkTBMAC]$/) ? 'I<-X' : $opt_f ;
  372.  
  373.    # Skip introduction
  374.    while (<PFUNC>) {
  375.        last if /^=head2 Alphabetical Listing of Perl Functions/;
  376.    }
  377.  
  378.    # Look for our function
  379.    my $found = 0;
  380.    my @pod;
  381.    while (<PFUNC>) {
  382.        if (/^=item\s+\Q$search_string\E\b/o)  {
  383.        $found = 1;
  384.        } elsif (/^=item/) {
  385.        last if $found > 1;
  386.        }
  387.        next unless $found;
  388.        push @pod, $_;
  389.        ++$found if /^\w/;    # found descriptive text
  390.    }
  391.    if (@pod) {
  392.        if ($opt_t) {
  393.        open(FORMATTER, "| pod2text") || die "Can't start filter";
  394.        print FORMATTER "=over 8\n\n";
  395.        print FORMATTER @pod;
  396.        print FORMATTER "=back\n";
  397.        close(FORMATTER);
  398.        } elsif (@pod < $lines-2) {
  399.        print @pod;
  400.        } else {
  401.        foreach my $pager (@pagers) {
  402.         open (PAGER, "| $pager") or next;
  403.         print PAGER @pod ;
  404.         close(PAGER) or next;
  405.         last;
  406.        }
  407.        }
  408.    } else {
  409.        die "No documentation for perl function `$opt_f' found\n";
  410.    }
  411.    exit;
  412. }
  413.  
  414. if ($opt_q) {
  415.    local @ARGV = @found;    # I'm lazy, sue me.
  416.    my $found = 0;
  417.    my %found_in;
  418.    my @pod;
  419.  
  420.    while (<>) {
  421.       if (/^=head2\s+.*(?:$opt_q)/oi) {
  422.      $found = 1;
  423.      push @pod, "=head1 Found in $ARGV\n\n" unless $found_in{$ARGV}++;
  424.       } elsif (/^=head2/) {
  425.      $found = 0;
  426.       }
  427.       next unless $found;
  428.       push @pod, $_;
  429.    }
  430.    
  431.    if (@pod) {
  432.       if ($opt_t) {
  433.      open(FORMATTER, "| pod2text") || die "Can't start filter";
  434.      print FORMATTER "=over 8\n\n";
  435.      print FORMATTER @pod;
  436.      print FORMATTER "=back\n";
  437.      close(FORMATTER);
  438.       } elsif (@pod < $lines-2) {
  439.      print @pod;
  440.       } else {
  441.      foreach my $pager (@pagers) {
  442.         open (PAGER, "| $pager") or next;
  443.         print PAGER @pod ;
  444.         close(PAGER) or next;
  445.         last;
  446.      }
  447.       }
  448.    } else {
  449.       die "No documentation for perl FAQ keyword `$opt_q' found\n";
  450.    }
  451.    exit;
  452. }
  453.  
  454. foreach (@found) {
  455.  
  456.     my $err;
  457.     if($opt_t) {
  458.         open(TMP,">>$tmp");
  459.         Pod::Text::pod2text($_,*TMP);
  460.         close(TMP);
  461.     } elsif(not $opt_u) {
  462.         my $cmd = "pod2man --lax $_ | nroff -man";
  463.         $cmd .= " | col -x" if $^O =~ /hpux/;
  464.         my $rslt = `$cmd`;
  465.         unless(($err = $?)) {
  466.             open(TMP,">>$tmp");
  467.             print TMP $rslt;
  468.             close TMP;
  469.         }
  470.     }
  471.                                                     
  472.     if( $opt_u or $err or -z $tmp) {
  473.         open(OUT,">>$tmp");
  474.         open(IN,"<$_");
  475.         my $cut = 1;
  476.         while (<IN>) {
  477.             $cut = $1 eq 'cut' if /^=(\w+)/;
  478.             next if $cut;
  479.             print OUT;
  480.         }
  481.         close(IN);
  482.         close(OUT);
  483.     }
  484. }
  485.  
  486. if( $no_tty ) {
  487.     open(TMP,"<$tmp");
  488.     print while <TMP>;
  489.     close(TMP);
  490. } else {
  491.     foreach my $pager (@pagers) {
  492.         system("$pager $tmp") or last;
  493.     }
  494. }
  495.  
  496. 1 while unlink($tmp); #Possibly pointless VMSism
  497.  
  498. exit 0;
  499.  
  500. __END__
  501.  
  502. =head1 NAME
  503.  
  504. perldoc - Look up Perl documentation in pod format.
  505.  
  506. =head1 SYNOPSIS
  507.  
  508. B<perldoc> [B<-h>] [B<-v>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>]  [B<-X>] PageName|ModuleName|ProgramName
  509.  
  510. B<perldoc> B<-f> BuiltinFunction
  511.  
  512. B<perldoc> B<-q> FAQ Keyword
  513.  
  514. =head1 DESCRIPTION
  515.  
  516. I<perldoc> looks up a piece of documentation in .pod format that is embedded
  517. in the perl installation tree or in a perl script, and displays it via
  518. C<pod2man | nroff -man | $PAGER>. (In addition, if running under HP-UX,
  519. C<col -x> will be used.) This is primarily used for the documentation for
  520. the perl library modules.
  521.  
  522. Your system may also have man pages installed for those modules, in
  523. which case you can probably just use the man(1) command.
  524.  
  525. =head1 OPTIONS
  526.  
  527. =over 5
  528.  
  529. =item B<-h> help
  530.  
  531. Prints out a brief help message.
  532.  
  533. =item B<-v> verbose
  534.  
  535. Describes search for the item in detail.
  536.  
  537. =item B<-t> text output
  538.  
  539. Display docs using plain text converter, instead of nroff. This may be faster,
  540. but it won't look as nice.
  541.  
  542. =item B<-u> unformatted
  543.  
  544. Find docs only; skip reformatting by pod2*
  545.  
  546. =item B<-m> module
  547.  
  548. Display the entire module: both code and unformatted pod documentation.
  549. This may be useful if the docs don't explain a function in the detail
  550. you need, and you'd like to inspect the code directly; perldoc will find
  551. the file for you and simply hand it off for display.
  552.  
  553. =item B<-l> file name only
  554.  
  555. Display the file name of the module found.
  556.  
  557. =item B<-F> file names
  558.  
  559. Consider arguments as file names, no search in directories will be performed.
  560.  
  561. =item B<-f> perlfunc
  562.  
  563. The B<-f> option followed by the name of a perl built in function will
  564. extract the documentation of this function from L<perlfunc>.
  565.  
  566. =item B<-q> perlfaq
  567.  
  568. The B<-q> option takes a regular expression as an argument.  It will search
  569. the question headings in perlfaq[1-9] and print the entries matching
  570. the regular expression.
  571.  
  572. =item B<-X> use an index if present
  573.  
  574. The B<-X> option looks for a entry whose basename matches the name given on the
  575. command line in the file C<$Config{archlib}/pod.idx>.  The pod.idx file should
  576. contain fully qualified filenames, one per line.
  577.  
  578. =item B<PageName|ModuleName|ProgramName>
  579.  
  580. The item you want to look up.  Nested modules (such as C<File::Basename>)
  581. are specified either as C<File::Basename> or C<File/Basename>.  You may also
  582. give a descriptive name of a page, such as C<perlfunc>. You make also give a
  583. partial or wrong-case name, such as "basename" for "File::Basename", but
  584. this will be slower, if there is more then one page with the same partial
  585. name, you will only get the first one.
  586.  
  587. =back
  588.  
  589. =head1 ENVIRONMENT
  590.  
  591. Any switches in the C<PERLDOC> environment variable will be used before the 
  592. command line arguments.  C<perldoc> also searches directories
  593. specified by the C<PERL5LIB> (or C<PERLLIB> if C<PERL5LIB> is not
  594. defined) and C<PATH> environment variables.
  595. (The latter is so that embedded pods for executables, such as
  596. C<perldoc> itself, are available.)  C<perldoc> will use, in order of
  597. preference, the pager defined in C<PERLDOC_PAGER>, C<MANPAGER>, or
  598. C<PAGER> before trying to find a pager on its own.  (C<MANPAGER> is not
  599. used if C<perldoc> was told to display plain text or unformatted pod.)
  600.  
  601. =head1 AUTHOR
  602.  
  603. Kenneth Albanowski <kjahds@kjahds.com>
  604.  
  605. Minor updates by Andy Dougherty <doughera@lafcol.lafayette.edu>
  606.  
  607. =cut
  608.  
  609. #
  610. # Version 1.14: Wed Jul 15 01:50:20 EST 1998
  611. #       Robin Barker <rmb1@cise.npl.co.uk>
  612. #    -strict, -w cleanups
  613. # Version 1.13: Fri Feb 27 16:20:50 EST 1997
  614. #       Gurusamy Sarathy <gsar@umich.edu>
  615. #    -doc tweaks for -F and -X options
  616. # Version 1.12: Sat Apr 12 22:41:09 EST 1997
  617. #       Gurusamy Sarathy <gsar@umich.edu>
  618. #    -various fixes for win32
  619. # Version 1.11: Tue Dec 26 09:54:33 EST 1995
  620. #       Kenneth Albanowski <kjahds@kjahds.com>
  621. #   -added Charles Bailey's further VMS patches, and -u switch
  622. #   -added -t switch, with pod2text support
  623. # Version 1.10: Thu Nov  9 07:23:47 EST 1995
  624. #        Kenneth Albanowski <kjahds@kjahds.com>
  625. #    -added VMS support
  626. #    -added better error recognition (on no found pages, just exit. On
  627. #     missing nroff/pod2man, just display raw pod.)
  628. #    -added recursive/case-insensitive matching (thanks, Andreas). This
  629. #     slows things down a bit, unfortunately. Give a precise name, and
  630. #     it'll run faster.
  631. #
  632. # Version 1.01:    Tue May 30 14:47:34 EDT 1995
  633. #        Andy Dougherty  <doughera@lafcol.lafayette.edu>
  634. #   -added pod documentation.
  635. #   -added PATH searching.
  636. #   -added searching pod/ subdirectory (mainly to pick up perlfunc.pod
  637. #    and friends.
  638. #
  639. #
  640. # TODO:
  641. #
  642. #    Cache directories read during sloppy match
  643.